package net.lab1024.sa.base.module.support.syslog.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.DictDataDeserializer;

/**
 * 陈玉强 新建表单
 *
 * @Author 陈玉强
 * @Date 2025-10-20 00:17:05
 * @Copyright 1
 */

@Data
public class SyslogConfigAddForm {

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "名称 不能为空")
    private String name;

    @Schema(description = "服务器ip", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "服务器ip 不能为空")
    private String syslogServerIp;

    @Schema(description = "服务器端口", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "服务器端口 不能为空")
    private String syslogServerPort;

    @Schema(description = "协议类型", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "协议类型 不能为空")
    @JsonDeserialize(using = DictDataDeserializer.class)
    private String protocolType;

    @Schema(description = "启用状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "启用状态 不能为空")
    @JsonDeserialize(using = DictDataDeserializer.class)
    private String forwardEnabled;

    @Schema(description = "加密状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "加密状态 不能为空")
    @JsonDeserialize(using = DictDataDeserializer.class)
    private String tlsEnabled;


    private String topic;


    private String password;


    private String remark;


    private Long logCount;


    private LocalDateTime createTime;


    private LocalDateTime updateTime;


    private String createUser;

    private String updateUser;

}